#!/bin/bash

testDir="./testy"
extIn="in"
extOut="out"
mainProgram="main"
tmpFileOut="${testDir}/tmp.${extOut}"

for fileIn in ${testDir}/*.in
do

	echo "fileIn=$fileIn"

	fileName=${fileIn%.${extIn}}

#	echo "file name is: ${fileName}"

	fileOut=${fileName}.${extOut}

#	echo "file out is: ${fileOut}"

	time ./${mainProgram} < ${fileIn} > ${tmpFileOut}
	diff ${fileOut} ${tmpFileOut}
	
done

rm ${tmpFileOut}
